package com.xiaomaoguai.di34;

/*
 * @Description :
 * @FileName: ExtendedOperation.java
 * @Author :WeiHui.Zhang
 * @Data : 2015年1月4日 下午1:47:03
 * @Version:1.0.0
 */
public enum ExtendedOperation implements Operation {

	EXP("^") {

		@Override
		public double apply(double x, double y) {
			return Math.pow(x, y);
		}
	},
	REMAINDER("%") {

		@Override
		public double apply(double x, double y) {
			return x % y;
		}
	};

	private final String symbol;

	private ExtendedOperation(String symbol) {
		this.symbol = symbol;
	}

	@Override
	public String toString() {
		return symbol;
	}
}
